package com.xywh.dakaqiandao.di.module;

import com.jess.arms.di.scope.ActivityScope;

import dagger.Module;
import dagger.Provides;

import com.xywh.dakaqiandao.mvp.contract.DiQuSheZhiContract;
import com.xywh.dakaqiandao.mvp.model.DiQuSheZhiModel;


@Module
public class DiQuSheZhiModule {
    private DiQuSheZhiContract.View view;

    /**
     * 构建DiQuSheZhiModule时,将View的实现类传进来,这样就可以提供View的实现类给presenter
     *
     * @param view
     */
    public DiQuSheZhiModule(DiQuSheZhiContract.View view) {
        this.view = view;
    }

    @ActivityScope
    @Provides
    DiQuSheZhiContract.View provideDiQuSheZhiView() {
        return this.view;
    }

    @ActivityScope
    @Provides
    DiQuSheZhiContract.Model provideDiQuSheZhiModel(DiQuSheZhiModel model) {
        return model;
    }
}